package com.xiaomaoguai.activiti.processInstance;

import org.activiti.engine.ProcessEngine;
import org.activiti.engine.ProcessEngines;
import org.activiti.engine.RepositoryService;
import org.activiti.engine.repository.Deployment;
import org.junit.Test;

/**
 * @ FileName: ProcessInstanceTest.java
 * @ Author: WeiHui-Z
 * @ Date: 2017-01-11  22:43
 * @ Version: v1.0.0
 */
public class ProcessInstanceTest {

	private ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();

	@Test
	public void testDeploy2() {
		RepositoryService repositoryService = processEngine.getRepositoryService();
		Deployment deployment = repositoryService.createDeployment().name("helloworldProcess") // 创建一个部署对象
				.addClasspathResource("diagrams/process.bpmn30.xml")
				.deploy();
		System.out.println("部署ID：" + deployment.getId());// 32501
		System.out.println("部署名称：" + deployment.getName());// helloworldProcess
	}


	/**
	 *
	 * 流程实例： 执行对象： 任务
	 *
	 * act_ru_execution
	 *
	 */


}
